<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>班级课表信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
                    // document.getElementById("schoolyear").value = document.getElementById("schoolyear").value + "-01-01";
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/biz/bizStudentTimetable/">班级课表信息列表</a></li>
		<li class="active"><a href="${ctx}/biz/bizStudentTimetable/form?id=${bizStudentTimetable.id}">班级课表信息<shiro:hasPermission name="biz:bizStudentTimetable:edit">${not empty bizStudentTimetable.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="biz:bizStudentTimetable:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="bizStudentTimetable" action="${ctx}/biz/bizStudentTimetable/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">学年：</label>
			<div class="controls">
				<input name="schoolyear" id="schoolyear" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
					   value="${bizStudentTimetable.schoolyear}"
					   onclick="WdatePicker({dateFmt:'yyyy'});" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">学期：</label>
			<div class="controls">
				<select  id="term" name="term" class="input-xlarge required">
					<option value="">请选择</option>
					<c:forEach items="${fns:getDictList( 'term')}" var="term">
						<option value="${term.value}" <c:if test="${bizStudentTimetable.term eq term.value}">selected</c:if>>${term.label}</option>
					</c:forEach>
				</select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">学周开始：</label>
			<div class="controls">
				<select  id="weekstart" name="weekstart" class="input-xlarge required">
					<option value="">请选择</option>
					<c:forEach items="${fns:getDictList( 'week')}" var="week">
						<option value="${week.value}" <c:if test="${bizStudentTimetable.weekstart eq week.value}">selected</c:if>>${week.label}</option>
					</c:forEach>
				</select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">学周结束：</label>
			<div class="controls">
				<select  id="weekend" name="weekend" class="input-xlarge required">
					<option value="">请选择</option>
					<c:forEach items="${fns:getDictList( 'week')}" var="week">
						<option value="${week.value}" <c:if test="${bizStudentTimetable.weekend eq week.value}">selected</c:if>>${week.label}</option>
					</c:forEach>
				</select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">星期几：</label>
			<div class="controls">
				<select  id="weekday" name="weekday" class="input-xlarge required">
					<option value="">请选择</option>
					<c:forEach items="${fns:getDictList( 'weekday')}" var="weekday">
						<option value="${weekday.value}" <c:if test="${bizStudentTimetable.weekday eq weekday.value}">selected</c:if>>${weekday.label}</option>
					</c:forEach>
				</select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">课节：</label>
			<div class="controls">
				<select  id="section" name="section" class="input-xlarge required">
					<option value="">请选择</option>
					<c:forEach items="${fns:getDictList( 'section')}" var="section">
						<option value="${section.value}" <c:if test="${bizStudentTimetable.section eq section.value}">selected</c:if>>${section.label}</option>
					</c:forEach>
				</select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">课程名称：</label>
			<div class="controls">
				<form:input path="coursename" htmlEscape="false" maxlength="100" class="input-xlarge required" value="${bizStudentTimetable.coursename}"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">班级名称：</label>
			<div class="controls">
				<sys:treeselect id="classid" name="classid" value="${bizStudentTimetable.classid}" labelName="classname" labelValue="${bizStudentTimetable .classname}"
								title="班级" url="/sys/office/treeData?type=2&inSchool=true" cssClass="input-xlarge" allowClear="true" notAllowSelectParent="true" required="true"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<%--<div class="control-group">
			<label class="control-label">学生id：</label>
			<div class="controls">
				<form:input path="studentid" htmlEscape="false" maxlength="100" class="input-xlarge "/>
			</div>
		</div>--%>
		<%--<div class="control-group">--%>
			<%--<label class="control-label">学生姓名：</label>--%>
			<%--&lt;%&ndash;<div class="controls">--%>
			<%--<select  id="studentidcard" name="studentidcard" class="input-xlarge required"  onchange="$('#studentname').val($('#studentidcard option:selected').text());">--%>
				<%--<option value="">请选择</option>--%>
				<%--<c:forEach items="${studentlist}" var="student">--%>
					<%--<option value="${student.loginName}" <c:if test="${bizStudentTimetable.studentidcard eq student.loginName}">selected</c:if>>${student.name}</option>--%>
				<%--</c:forEach>--%>
			<%--</select>--%>
			<%--<span class="help-inline"><font color="red">*</font> </span>--%>
			<%--</div>&ndash;%&gt;--%>
			<%--<div class="controls">--%>
				<%--<sys:treeselect id="studentid" name="studentid" value="${bizStudentTimetable.studentid}" labelName="studentname" labelValue="${bizStudentTimetable.studentname}"--%>
								<%--title="学生" url="/sys/user/treeData2?isOffice=true&userType=3" cssClass="input-xlarge" allowClear="true" notAllowSelectParent="true" required="true"/>--%>
				<%--<span class="help-inline"><font color="red">*</font> </span>--%>
			<%--</div>--%>
		<%--</div>--%>
	<%--	<div class="control-group">
			<label class="control-label">上课教师id：</label>
			<div class="controls">
				<form:input path="teacherid" htmlEscape="false" maxlength="100" class="input-xlarge "/>
			</div>
		</div>--%>
		<div class="control-group">
			<label class="control-label">上课教师：</label>
			<div class="controls">
				<sys:treeselect id="teacherid" name="teacherid" value="${bizStudentTimetable.teacherid}" labelName="teachername" labelValue="${bizStudentTimetable.teachername}"
								title="教师" url="/sys/user/treeData2?isOffice=true&userType=2" cssClass="input-xlarge" allowClear="true" notAllowSelectParent="true" required="true"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">上课地址：</label>
			<div class="controls">
				<form:input path="address" htmlEscape="false" maxlength="100"  class="input-xlarge required" value="${bizStudentTimetable.address}"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备注：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="biz:bizStudentTimetable:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>